package com.zan.pattern.state.before;

/**
 * @Author Zan
 * @Create 2024/4/27 14:07
 * @Description : TODO(请用一句话描述该类的功能)
 * @ClassName: Client
 */
public class Client {
    public static void main(String[] args) {
        // 创建电梯对象
        Lift lift = new Lift();
        // 设置当前电梯的状态
//        lift.setState(ILift.OPENING_STATE); // 电梯是开启的
        lift.setState(ILift.RUNNING_STATE);

        // 开门
        lift.open();
        lift.close();
        lift.run();
        lift.stop();
    }
}
